#include <math.h>

#include "../include/rotation.h"
#include <math.h>

void Rotation::setx(double p){
	m.m[0][0] = 1; 			m.m[0][1] = 0; 			m.m[0][2] = 0; 			m.m[0][3] = 0;
	m.m[1][0] = 0; 			m.m[1][1] = cos(p); 	m.m[1][2] = sin(p); 	m.m[1][3] = 0;
	m.m[2][0] = 0; 			m.m[2][1] = -sin(p); 	m.m[2][2] = cos(p); 	m.m[2][3] = 0;
	m.m[3][0] = 0; 			m.m[3][1] = 0; 			m.m[3][2] = 0; 			m.m[3][3] = 1;
}
void Rotation::sety(double p){
	m.m[0][0] = cos(p); 	m.m[0][1] = 0; 			m.m[0][2] = -sin(p); 	m.m[0][3] = 0;
	m.m[1][0] = 0; 			m.m[1][1] = 1; 			m.m[1][2] = 0; 			m.m[1][3] = 0;
	m.m[2][0] = sin(p); 	m.m[2][1] = 0; 			m.m[2][2] = cos(p); 	m.m[2][3] = 0;
	m.m[3][0] = 0; 			m.m[3][1] = 0; 			m.m[3][2] = 0; 			m.m[3][3] = 1;
}
void Rotation::setz(double p){
	m.m[0][0] = cos(p); 	m.m[0][1] = sin(p); 	m.m[0][2] = 0; 			m.m[0][3] = 0;
	m.m[1][0] = -sin(p); 	m.m[1][1] = cos(p); 	m.m[1][2] = 0; 			m.m[1][3] = 0;
	m.m[2][0] = 0; 			m.m[2][1] = 0; 			m.m[2][2] = 1; 			m.m[2][3] = 0;
	m.m[3][0] = 0; 			m.m[3][1] = 0; 			m.m[3][2] = 0; 			m.m[3][3] = 1;
}
